import axios from '~/axios'

// 添加交易申请确认函模板
export function addTradeApplicationTemplateConfirmLetterApi(data) {
    return axios.post('/basic/lindi/tradeApplicationTemplateConfirmLetter/addTradeApplicationTemplateConfirmLetter', data)
}

// 删除交易申请确认函模板
export function deleteTradeApplicationTemplateConfirmLetterByTemplateConfirmLetterIdApi(tradeApplicationTemplateConfirmLetterId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/tradeApplicationTemplateConfirmLetter/deleteTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterId',
        params: {
            tradeApplicationTemplateConfirmLetterId: tradeApplicationTemplateConfirmLetterId
        }
    })
}

// 修改交易申请确认函模板
export function updateTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterIdApi(data) {
    return axios.put('/basic/lindi/tradeApplicationTemplateConfirmLetter/updateTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterId', data)
}

// 分页查询交易申请确认函模板列表
export function getPageTradeApplicationTemplateConfirmLetterListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/tradeApplicationTemplateConfirmLetter/getPageTradeApplicationTemplateConfirmLetterList',
        params: params
    })
}

// 根据交易申请确认函模板ID查询交易申请确认函模板详情
export function getTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterIdApi(tradeApplicationTemplateConfirmLetterId) {
    return axios.get(`/basic/lindi/tradeApplicationTemplateConfirmLetter/getTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterId/${tradeApplicationTemplateConfirmLetterId}`)
}

// 删除交易申请确认函模板文件
export function deleteTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterId(tradeApplicationTemplateConfirmLetterId) {
    return axios({
        method: 'POST',
        url: '/basic/lindi/tradeApplicationTemplateConfirmLetter/deleteTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterId',
        params: {
            tradeApplicationTemplateConfirmLetterId: tradeApplicationTemplateConfirmLetterId
        }
    })
}

// 生成交易申请确认函模板
export function generateTemplateConfirmLetterApi(params) {
    return axios({
        method: 'POST',
        url: '/basic/lindi/tradeApplicationTemplateConfirmLetter/generateTemplateConfirmLetter',
        params: params
    })
}

// 分页查询交易申请合同模板列表
export function getPageTradeApplicationTemplateContractListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/tradeApplicationTemplateContract/getPageTradeApplicationTemplateContractList',
        params: params
    })
}

export function getContractTemplateListApi() {
    return axios({
        method: 'GET',
        url: '/basic/lindi/tradeApplicationTemplateContract/getContractTemplateList'
    })
}